Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: login page #446 #450

Merged
merged 4 commits into from
Nov 6, 2024

Conversation

AE-Hertz
Copy link
Contributor

@AE-Hertz AE-Hertz commented Nov 2, 2024

Enhancement: login page #446

Closes: #446

Things which have been improved-

  • fixed toggle password eye button for login and signup page
  • fix image overflow in login page
  • fix image overflow in signup page
  • drastically reduced img file size by 60%

Before:
Screenshot 2024-11-02 134830
Screenshot 2024-11-02 130803
Screenshot 2024-11-02 134844

After:

Screenshot 2024-11-02 131327
Screenshot 2024-11-02 134358
Screenshot 2024-11-02 131341

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced "Remember Me" functionality in the login process.
    • Added a button for signing up with Google on the signup page.
  • Improvements

    • Updated layout and styling for the Login, Signup, and Email Verification pages, including dark mode support.
    • Enhanced user input validation and error handling for OTP verification.
    • Updated image assets across multiple components for a more optimized visual experience.
  • Documentation

    • Updated contributors' section in the README file.

Copy link

vercel bot commented Nov 2, 2024

@AE-Hertz is attempting to deploy a commit to the bunty's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

coderabbitai bot commented Nov 2, 2024

Walkthrough

The changes in this pull request primarily involve updates to the contributors' section of the README.md file, replacing several contributor names with new ones. Additionally, modifications were made to the EmailVerify, Login, Signup, and verifyRegisterOtp components, including image updates and the introduction of a "Remember Me" feature in the Login component. The overall functionality of these components remains intact, with enhancements focused on user input validation and layout adjustments.

Changes

File Path Change Summary
README.md Updated contributors: replaced several names and reintroduced one contributor.
frontend/src/components/Pages/EmailVerify.jsx Updated image import from login.png to login-opt.png. No other changes to functionality.
frontend/src/components/Pages/Login.jsx Added "Remember Me" feature, updated image import, and modified layout for responsiveness and dark mode.
frontend/src/components/Pages/Signup.jsx Updated image import from login.png to login-opt.png and adjusted layout for styling consistency.
frontend/src/components/Pages/verifyRegisterOtp.jsx Updated image import from login.png to login-opt.png and enhanced error handling for OTP verification.

Assessment against linked issues

Objective Addressed Explanation
Enhance the login page (#[446])
Improve rendering speed of the login image (#[446])

Possibly related PRs

  • fixed the contributors readme issue. #77: This PR focuses on fixing the contributors section in the README.md, which is directly related to the changes made in the main PR regarding updates to the contributors' section.
  • Signup/login/page #173: Similar to fixed the contributors readme issue. #77, this PR also involves updates to the contributors' section in the README.md, including the addition and removal of contributors, which aligns with the changes in the main PR.
  • feat: Dark Mode #379: This PR updates the contributors' section in the README.md, including changes to contributor names and links, which is relevant to the main PR's updates.
  • Otp verification for registration #409: This PR also modifies the contributors' section in the README.md, reflecting changes in contributor details, which relates to the main PR's focus on contributor updates.
  • Restrict Event Booking to Verified Users #427: This PR includes updates to the contributors' section in the README.md, which aligns with the changes made in the main PR regarding contributor information.

Suggested labels

enhancement, level2, gssoc-ext, hacktoberfest accepted

Suggested reviewers

  • RamakrushnaBiswal

Poem

🐇 In the meadow where bunnies play,
New names in the README brighten the day.
With a click and a hop, the login's a breeze,
"Remember Me" whispers, "Stay if you please!"
So let’s cheer for the changes, a joyful delight,
Hopping forward, everything feels just right! 🌼


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 4163e8c and 7439ffc.

📒 Files selected for processing (1)
  • frontend/src/components/Pages/Login.jsx (5 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • frontend/src/components/Pages/Login.jsx

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

github-actions bot commented Nov 2, 2024

Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. In the meantime, please ensure that your changes align with our CONTRIBUTING.md. If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊

@AE-Hertz
Copy link
Contributor Author

AE-Hertz commented Nov 2, 2024

if you can upgrade the level that would be appreciated. thank you/

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Outside diff range and nitpick comments (8)
frontend/src/components/Pages/verifyRegisterOtp.jsx (2)

Line range hint 28-47: Enhance input validation for better security.

While basic validation is implemented, consider strengthening it:

-if (!email || !/\S+@\S+\.\S+/.test(email)) {
+const EMAIL_REGEX = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
+if (!email || !EMAIL_REGEX.test(email)) {
   setError('Please enter a valid email address');
   setIsLoading(false);
   return;
 }

-if (otp.length !== 6) {
+if (otp.length !== 6 || !/^\d{6}$/.test(otp)) {
   setError('Please enter a valid 6-digit OTP');
   setIsLoading(false);
   return;
 }

Line range hint 89-117: Enhance accessibility for error messages and loading states.

The current implementation has good accessibility features, but could be improved:

 {error && (
-  <div className="w-full p-2 bg-red-100 text-red-700 border border-red-400 rounded-md">
+  <div 
+    role="alert"
+    aria-live="polite"
+    className="w-full p-2 bg-red-100 text-red-700 border border-red-400 rounded-md">
     {error}
   </div>
 )}

 <button
   type="submit"
-  className="button-confirm mx-auto mt-12 px-4 w-30 h-10 rounded-md border-2 border-black bg-beige shadow-[4px_4px_0px_0px_black] text-[17px] font-semibold text-[#323232] cursor-pointer active:shadow-none active:translate-x-[3px] active:translate-y-[3px]"
+  className={`button-confirm mx-auto mt-12 px-4 w-30 h-10 rounded-md border-2 border-black ${
+    isLoading ? 'bg-gray-200' : 'bg-beige'
+  } shadow-[4px_4px_0px_0px_black] text-[17px] font-semibold text-[#323232] cursor-pointer active:shadow-none active:translate-x-[3px] active:translate-y-[3px] disabled:opacity-50 disabled:cursor-not-allowed`}
   disabled={isLoading}
+  aria-busy={isLoading}
 >
   {isLoading ? 'Submitting...' : 'Verify OTP →'}
 </button>
frontend/src/components/Pages/Login.jsx (3)

Line range hint 15-15: Review security implications of Remember Me feature.

The implementation of Remember Me looks good, but consider these security aspects:

  1. The 7-day token expiration for Remember Me could increase security risks
  2. Consider adding refresh token mechanism for long-lived sessions
  3. Cookie security attributes are properly set (secure, sameSite)

Consider implementing:

  1. Refresh token rotation
  2. Activity-based token refresh
  3. Server-side session tracking

Also applies to: 33-40


70-70: Improve dark mode accessibility and consistency.

The dark mode implementation could benefit from these enhancements:

  1. Consider using CSS variables for consistent shadow colors
  2. Ensure sufficient contrast ratios for dark mode text
  3. Standardize the shadow implementation
-  className="... dark:shadow-[4px_4px_0px_0px_grey] ..."
+  className="... dark:shadow-[4px_4px_0px_0px_var(--shadow-dark)] ..."

Add to your CSS:

:root {
  --shadow-dark: rgb(75, 75, 75);
}

Also applies to: 80-80, 89-89, 138-138, 148-148


Line range hint 95-104: Enhance password toggle button accessibility.

While the password toggle functionality works, consider these accessibility improvements:

 <button
   className="absolute top-1/2 transform -translate-y-1/2 right-4"
+  type="button"
+  aria-label={hidden ? "Show password" : "Hide password"}
   onClick={(e) => {
     e.preventDefault();
     setHidden(!hidden);
   }}
 >
   {hidden ? <FaEyeSlash /> : <FaEye />}
 </button>
frontend/src/components/Pages/Signup.jsx (3)

131-137: Enhance password toggle button accessibility.

While the toggle functionality works, consider these accessibility improvements:

 <button  
   className="absolute top-1/2 transform -translate-y-1/2 right-4"
+  type="button"
+  aria-label={hidden ? "Show password" : "Hide password"}
   onClick={(e) => { 
     e.preventDefault(); 
     setHidden(!hidden); 
   }}
 >

Line range hint 28-50: Strengthen email validation logic.

Consider using a more robust email validation pattern instead of the basic '@' check:

-    if (!data.email.includes('@')) {
+    const emailPattern = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
+    if (!emailPattern.test(data.email)) {
       setError('Please enter a valid email address');
       setIsLoading(false);
       return;
     }

101-101: Consider refining dark mode color scheme.

The current dark mode uses amber-800 which might be too intense. Consider a more neutral background color for better readability:

-  className="z-10 p-8 lg:p-16 bg-[#f1e9dc] dark:bg-amber-800 dark:text-white flex flex-col gap-6 rounded-lg border-2 border-black shadow-[4px_4px_0px_0px_black] dark:shadow-[4px_4px_0px_0px_grey]"
+  className="z-10 p-8 lg:p-16 bg-[#f1e9dc] dark:bg-gray-800 dark:text-white flex flex-col gap-6 rounded-lg border-2 border-black shadow-[4px_4px_0px_0px_black] dark:shadow-[4px_4px_0px_0px_rgba(255,255,255,0.2)]"

Also applies to: 110-110, 117-117, 125-125

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between e5d522e and 5aab060.

⛔ Files ignored due to path filters (1)
  • frontend/src/assets/login-opt.png is excluded by !**/*.png
📒 Files selected for processing (5)
  • README.md (9 hunks)
  • frontend/src/components/Pages/EmailVerify.jsx (1 hunks)
  • frontend/src/components/Pages/Login.jsx (5 hunks)
  • frontend/src/components/Pages/Signup.jsx (6 hunks)
  • frontend/src/components/Pages/verifyRegisterOtp.jsx (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • frontend/src/components/Pages/EmailVerify.jsx
🧰 Additional context used
🪛 Markdownlint
README.md

371-371: Column: 1
Hard tabs

(MD010, no-hard-tabs)


372-372: Column: 1
Hard tabs

(MD010, no-hard-tabs)


415-415: Column: 1
Hard tabs

(MD010, no-hard-tabs)


416-416: Column: 1
Hard tabs

(MD010, no-hard-tabs)


459-459: Column: 1
Hard tabs

(MD010, no-hard-tabs)


460-460: Column: 1
Hard tabs

(MD010, no-hard-tabs)


503-503: Column: 1
Hard tabs

(MD010, no-hard-tabs)


504-504: Column: 1
Hard tabs

(MD010, no-hard-tabs)


547-547: Column: 1
Hard tabs

(MD010, no-hard-tabs)


548-548: Column: 1
Hard tabs

(MD010, no-hard-tabs)


591-591: Column: 1
Hard tabs

(MD010, no-hard-tabs)


592-592: Column: 1
Hard tabs

(MD010, no-hard-tabs)

🔇 Additional comments (5)
frontend/src/components/Pages/verifyRegisterOtp.jsx (1)

Line range hint 48-67: Verify API endpoint security implementation.

The API endpoint handling sensitive OTP verification should be properly secured:

#!/bin/bash
# Check for other instances of this API endpoint to ensure consistent security measures
rg -g '!node_modules' -g '!dist' -A 3 '/api/user/verify'

Consider implementing:

  1. Rate limiting for OTP verification attempts
  2. CSRF protection tokens
  3. Request timeout for security
frontend/src/components/Pages/Login.jsx (1)

2-2: Verify image optimization metrics.

While the image has been renamed to indicate optimization (login-opt.png), let's verify the actual size reduction matches the 60% target mentioned in the PR objectives.

✅ Verification successful

Let me calculate the reduction percentage manually from the obtained sizes:

  • Original size: 4,273,500 bytes
  • Optimized size: 1,291,834 bytes
  • Reduction: ((4,273,500 - 1,291,834) / 4,273,500) * 100 = 69.77%

Image optimization exceeds the target reduction goal ✓

The optimized image (login-opt.png) shows a size reduction of approximately 70% compared to the original image (login.png), which surpasses the PR objective of 60% reduction. This change effectively contributes to improved page load performance.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Compare the size of original and optimized images
echo "Checking image sizes..."
original_size=$(find . -name "login.png" -exec ls -l {} \; | awk '{print $5}')
optimized_size=$(find . -name "login-opt.png" -exec ls -l {} \; | awk '{print $5}')

if [ ! -z "$original_size" ] && [ ! -z "$optimized_size" ]; then
    reduction=$(echo "scale=2; (($original_size - $optimized_size) / $original_size) * 100" | bc)
    echo "Size reduction: $reduction%"
fi

Length of output: 484

frontend/src/components/Pages/Signup.jsx (3)

2-2: Image optimization implemented effectively!

The changes successfully address the performance concerns:

  • Lazy loading improves initial page load
  • Responsive sizing with max-width constraints prevents overflow
  • Using optimized image version (-opt suffix) reduces file size

Also applies to: 94-98


93-93: Layout improvements effectively prevent overflow!

The container and form layout changes successfully:

  • Prevent page overflow with overflow-hidden
  • Maintain responsiveness with adaptive padding
  • Control maximum widths for different screen sizes

Also applies to: 101-101


2-2: Verify image size reduction.

Let's confirm the image optimization achieved the target 60% size reduction:

✅ Verification successful

Let me try a simpler verification script without relying on bc:


Image optimization successfully exceeds the target reduction

The optimization has achieved a 69.77% size reduction (from 4.27MB to 1.29MB), surpassing the target of 60%. This significant compression maintains image quality while improving page load performance.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Compare sizes of original and optimized images
original_size=$(fd -t f "login.png" | xargs ls -l | awk '{print $5}')
optimized_size=$(fd -t f "login-opt.png" | xargs ls -l | awk '{print $5}')

if [ ! -z "$original_size" ] && [ ! -z "$optimized_size" ]; then
  reduction=$(echo "scale=2; (($original_size - $optimized_size) / $original_size) * 100" | bc)
  echo "Size reduction: $reduction%"
  if (( $(echo "$reduction < 60" | bc -l) )); then
    echo "Warning: Image size reduction is less than the target 60%"
  fi
fi

Length of output: 511


Script:

#!/bin/bash
# Compare sizes of original and optimized images
original_size=$(fd -t f "login.png" | xargs ls -l | awk '{print $5}')
optimized_size=$(fd -t f "login-opt.png" | xargs ls -l | awk '{print $5}')

if [ ! -z "$original_size" ] && [ ! -z "$optimized_size" ]; then
    echo "Original size: $original_size bytes"
    echo "Optimized size: $optimized_size bytes"
    # Manual calculation: (4273500 - 1291834) / 4273500 * 100 ≈ 69.77%
fi

Length of output: 350

@@ -1,5 +1,5 @@
import { Link, useNavigate, useParams } from 'react-router-dom';
import photo from '../../assets/login.png';
import photo from '../../assets/login-opt.png';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

🛠️ Refactor suggestion

Image optimization needed - 1.3MB file size exceeds performance targets

The verification reveals critical performance concerns:

  • The image file size is 1.3MB, which is significantly large for web use
  • No WebP alternative exists
  • Current implementation lacks width/height attributes that prevent CLS

To achieve the PR's 60% file size reduction goal:

  • Convert the image to WebP format (expected size: ~400KB)
  • Implement responsive images with proper dimensions
  • Add explicit width/height attributes
<img 
  src={photo}
  alt="verify"
  loading="lazy"
  width="800"
  height="600"
  className="w-3/4 absolute object-contain"
/>
🔗 Analysis chain

Verify image optimization for performance.

While the image has been updated and includes lazy loading, consider the following optimizations to align with the PR's performance objectives:

Consider implementing the following improvements:

  1. Add explicit width and height attributes to prevent layout shifts
  2. Use modern image formats like WebP with PNG fallback
  3. Consider implementing responsive images using srcset for different viewport sizes
-<img src={photo} alt="verify" loading="lazy" className="w-3/4 absolute" />
+<img 
+  src={photo}
+  alt="verify"
+  loading="lazy"
+  width="800"
+  height="600"
+  className="w-3/4 absolute object-contain"
+/>

Also applies to: 2-2


Let me try another approach to verify the image-related concerns.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check the size of the new image
find . -name "login-opt.png" -exec ls -lh {} \;

Length of output: 420


Script:

#!/bin/bash
# Search for the image file in different locations
fd "login-opt.png" --type f --exec ls -lh {}

# Check for any WebP versions of the image
fd "login-opt.webp" --type f

# Look for other image imports in the component
rg -l "from.*\.(png|jpg|jpeg|webp|gif)" frontend/src/components/Pages/verifyRegisterOtp.jsx

# Check image usage in the component
rg -A 2 "<img.*src=\{.*\}" frontend/src/components/Pages/verifyRegisterOtp.jsx

Length of output: 512

Comment on lines +58 to +64
<div className="w-screen h-screen pt-10 flex flex-col lg:flex-row items-center justify-center lg:space-x-10 px-4 dark:bg-black">
{/* Background Image */}
<img
src={photo}
alt="login"
loading="lazy"
className="absolute w-3/4 lg:w-auto lg:opacity-100 opacity-10 object-cover"
className="w-3/4 max-w-xs lg:max-w-2xl lg:w-1/2 object-contain mb-6 lg:mb-0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Enhance image loading and responsiveness.

While the current implementation addresses overflow issues, consider these improvements:

 <img
   src={photo}
   alt="login"
   loading="lazy"
-  className="w-3/4 max-w-xs lg:max-w-2xl lg:w-1/2 object-contain mb-6 lg:mb-0"
+  className="w-3/4 max-w-xs lg:max-w-2xl lg:w-1/2 object-contain mb-6 lg:mb-0 aspect-auto"
+  onError={(e) => {
+    e.target.onerror = null;
+    e.target.src = 'fallback-image.png';
+  }}
 />

Committable suggestion skipped: line range outside the PR's diff.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (1)
README.md (1)

371-372: Fix markdown formatting: Replace hard tabs with spaces.

There are several instances of hard tabs in the markdown file. While they render correctly, it's best practice to use spaces for consistent formatting across different editors and platforms.

Also applies to: 440-441, 486-487, 539-540, 585-586

🧰 Tools
🪛 Markdownlint

371-371: Column: 1
Hard tabs

(MD010, no-hard-tabs)


372-372: Column: 1
Hard tabs

(MD010, no-hard-tabs)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 5aab060 and 4163e8c.

📒 Files selected for processing (2)
  • README.md (9 hunks)
  • frontend/src/components/Pages/Signup.jsx (6 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • frontend/src/components/Pages/Signup.jsx
🧰 Additional context used
🪛 Markdownlint
README.md

371-371: Column: 1
Hard tabs

(MD010, no-hard-tabs)


372-372: Column: 1
Hard tabs

(MD010, no-hard-tabs)


440-440: Column: 1
Hard tabs

(MD010, no-hard-tabs)


441-441: Column: 1
Hard tabs

(MD010, no-hard-tabs)


486-486: Column: 1
Hard tabs

(MD010, no-hard-tabs)


487-487: Column: 1
Hard tabs

(MD010, no-hard-tabs)


539-539: Column: 1
Hard tabs

(MD010, no-hard-tabs)


540-540: Column: 1
Hard tabs

(MD010, no-hard-tabs)


585-585: Column: 1
Hard tabs

(MD010, no-hard-tabs)


586-586: Column: 1
Hard tabs

(MD010, no-hard-tabs)

🔇 Additional comments (1)
README.md (1)

Line range hint 1-700: Verify alignment with PR objectives.

The PR description and linked issue (#446) discuss enhancements to the login page, including fixing toggle password functionality and image optimization. However, the changes in this file only update the contributors list. Please ensure:

  1. The login page enhancements are included in other files
  2. The PR description accurately reflects all changes being made
✅ Verification successful

Let me check the login page changes to verify alignment with PR objectives.


Let me check the image optimization changes.


PR changes align with objectives and show improvements

The changes in this PR successfully address both mentioned objectives:

  1. Toggle password functionality is properly implemented in Login.jsx using FaEye/FaEyeSlash icons and state management
  2. Image optimization is achieved with login-opt.png (1.3MB) being significantly smaller than login.png (4.1MB), a ~68% reduction in size

The PR description accurately reflects the changes being made.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for files related to login page changes
echo "Searching for login-related files..."
fd -e jsx -e js -e ts -e tsx "login|Login" 

# Search for image-related changes
echo "Searching for image-related changes..."
fd -e png -e jpg -e jpeg -e webp

Length of output: 2840


Script:

#!/bin/bash
# Check the content of Login.jsx
echo "Content of Login.jsx:"
cat frontend/src/components/Pages/Login.jsx

# Check git changes for Login.jsx
echo -e "\nGit changes for Login.jsx:"
git diff frontend/src/components/Pages/Login.jsx

Length of output: 5995


Script:

#!/bin/bash
# Check git changes for the login-related images
echo "Git changes for login images:"
git diff frontend/src/assets/login.png frontend/src/assets/login-opt.png

# Get file sizes of the login images
echo -e "\nFile sizes of login images:"
ls -lh frontend/src/assets/login*.png

Length of output: 449

🧰 Tools
🪛 Markdownlint

371-371: Column: 1
Hard tabs

(MD010, no-hard-tabs)


372-372: Column: 1
Hard tabs

(MD010, no-hard-tabs)

Comment on lines +263 to +266
<a href="https://github.com/jainaryan04">
<img src="https://avatars.githubusercontent.com/u/138214350?v=4" width="100;" alt="jainaryan04"/>
<br />
<sub><b>Haseeb Zaki</b></sub>
<sub><b>Aryan Ramesh Jain</b></sub>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

LGTM on contributor updates, but please check for duplicates.

The contributor updates look good, but there are duplicate entries for some contributors:

  • Sajal Batra appears twice
  • PavanTeja2005 appears twice
  • Sourabh Singh Rawat appears twice

Please remove the duplicate entries to maintain a clean contributors list.

Also applies to: 270-273, 293-296, 300-303, 365-368, 374-377, 388-414, 488-493

@RamakrushnaBiswal
Copy link
Owner

@AE-Hertz resolve the conflicts

@AE-Hertz
Copy link
Contributor Author

AE-Hertz commented Nov 4, 2024

@AE-Hertz resolve the conflicts

merge conflicts resolved.

@AE-Hertz
Copy link
Contributor Author

AE-Hertz commented Nov 4, 2024

if you can upgrade the level that would be appreciated . thank you

@AE-Hertz
Copy link
Contributor Author

AE-Hertz commented Nov 5, 2024

@RamakrushnaBiswal can you please merge before anymore conflicts arises. thank you.

@RamakrushnaBiswal RamakrushnaBiswal merged commit d5ccf80 into RamakrushnaBiswal:main Nov 6, 2024
3 of 4 checks passed
@RamakrushnaBiswal RamakrushnaBiswal added bug Something isn't working enhancement New feature or request level2 for 25 points gssoc-ext gssoc-extd program hacktoberfest accepted hacktoberfest-accepted repo labels Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request gssoc-ext gssoc-extd program hacktoberfest accepted hacktoberfest-accepted repo level2 for 25 points
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhancement: login page
2 participants